import { http } from "@/utils/http.js";

// 名额券列表
export const upgradelist = (data) => {
  return http.request({
    method: "get",
    url: "/common/upgrade",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 升级创建

export const upgradecreate = (data) => {
  return http.request({
    method: "post",
    url: "/upgrade/create",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};
// 协议填写

export const upgradeagreeInfo = (data) => {
  return http.request({
    method: "post",
    url: "/upgrade/agreeInfo",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const agencyCreate = (data) => {
  return http.request({
    method: "post",
    url: "/upgrade/agencyCreate",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const getAreaPrice = (data) => {
  return http.request({
    method: "get",
    url: "/common/getAreaPrice",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const dataInfo = (data) => {
  return http.request({
    method: "post",
    url: "/upgrade/dataInfo",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const upgradeorder = (data) => {
  return http.request({
    method: "post",
    url: "/upgrade/order",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const upgradePay = (data) => {
  return http.request({
    method: "post",
    url: "/upgrade/pay",
    data: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const upgradeallnew = (data) => {
  return http.request({
    method: "get",
    url: "/upgrade/allnew",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const upgradedetails = (data) => {
  return http.request({
    method: "get",
    url: "/upgrade/details",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const transferApi = (data) => {
  return http.request({
    method: "get",
    url: "/common/transfer",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const upPageApi = (data) => {
  return http.request({
    method: "get",
    url: "/upgrade/upPage",
    params: {
      ...data,
      //   offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};
